package cn.openea.perpartner.wxpay.rabbit.controller;

import cn.openea.perpartner.wxpay.entity.PayOrder;
import cn.openea.perpartner.wxpay.rabbit.service.PublisherService;
import cn.openea.perpartner.wxpay.vo.R;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Weird077
 * @description TODO
 * @date 2023-05-15 14:11
 */
@Api(tags = "RabbitMQ测试接口")
@RestController
@RequestMapping("/api/rabbit")
public class RabbitController {
    @Autowired
    private PublisherService publisherService;

    @GetMapping("/sendMsg")
    public R sendMsg() {
        publisherService.execute(new PayOrder());
        return R.ok();
    }

}
